/* 用于验证码刷新
 * v1.3 jetsum. tonydon
 *  by Netbeans IDE 7.0.1
 *  VIMG.set(验证码链接,img 标签 ID);
 *  VIMG.reload();// 反复刷新
 *  VIMG.reload('s');//只导入一次
 */

var VIMG={
ct:0,
url:'',
imgid:'#codeimg',
f:'',
set:function(u,id){
this.url=u;
this.imgid=id||this.imgid;
},
reload:function(s){
if(this.ct>9){
    alert('您更换验证码过于频繁.');
    ut.reload();
    return;
}else{
   if(this.f==''&&!va.isnull(s)){
     this.f='0';$(this.imgid).attr('src',this.url+'?'+ut.r());
   }else if(va.isnull(s)){
      $(this.imgid).attr('src',this.url+'?'+ut.r());
   }
    this.ct++; 
}
}
};